package cn.edu.ujn.park.dao;

import cn.edu.ujn.park.dao.Coupon;

import java.util.List;

public interface CouponMapper {
    int deleteByPrimaryKey(Integer couponId);

    int insert(Coupon row);

    int insertSelective(Coupon row);

    Coupon selectByPrimaryKey(Integer couponId);

    int updateByPrimaryKeySelective(Coupon row);

    int updateByPrimaryKey(Coupon row);

    List<Coupon> selectAll(Coupon coupon);

    List<Coupon> selectByUserId(Coupon coupon);

    List<Coupon> selectUserCoupon(Integer userId);

    Integer selectCount();

    Integer selectCountByUserId(Integer userId);

    Integer acquireCoupon(Coupon coupon);

    boolean used(Integer couponId);
}